/* map.h */

// I'm going to use the C API from shaplib.maptools.org

#ifndef DODO_MAP_H
#define DODO_MAP_H

#include <vector>
#include <list>
#include <algorithm>

#include <dodo_plot/kernel/plotfwd.h>
#include <dodo_plot/kernel/basic_elements.h>
#include <dodo_plot/kernel/canvas.h>
#include <dodo_plot/kernel/plotter.h>
#include <dodo_plot/kernel/basic_utils.h>

#include <dodo_plot/map/map_data.h>
#include <dodo_plot/map/projection_common.h>

namespace dodo_plot
{

template<class Proj_T>
class Map
{
public:
	typedef Proj_T proj_type;

public:
	void draw(const Plotter& plotter) const;
	double width() const;
	double height() const;
	Position local_pos() const;
private:
	void draw_polygon(const Plotter& plotter) const;
	void draw_arc(const Plotter& plotter) const;

public:
	Map(const Map_Data& data, const Proj_T& map_proj); 

public:
	void set_line_width(double);
	void set_line_color(const Color&);
	void set_fill_color(const Color&);

private:
	Map_Data data_;
	Proj_T map_proj_;

	Color line_color_;
	double line_width_;
	Color fill_color_;

	//TODO map grid
	//Color grid_color_;
	//double grid_width_;
	//TODO symbol for points
	//Symbol symbol_;
	//
};

}

#include <dodo_plot/map/map.tcc>

#endif //DODO_MAP_H

